#import <Foundation/Foundation.h>


/**
 * Rotating queue of fixed size.
 * 
 * @author NetGis
 */

@interface RotatingQueue : NSObject {
    NSMutableArray * queue;
    int mostRecentItem;
    int size;
}


@property(nonatomic, retain, readonly) id lastInstertedElement;

- (id) initWithCapacity:(int)capacity;
- (void) insertElement:(id)element;
- (id) getElement:(int)index;
- (int) size;
- (void) setSize:(int)size;
- (NSMutableArray *) toList;
- (int) advancePointer: (int) oldPointer;
- (int) count;
- (id) getLastInsertedElement;
+ (void) main:(NSArray *)args;
@end
